EmbeddedSdk

Functions

Link copied to clipboard
fun answer(answer: Boolean)

For certain flows (export, authenticate, etc...) the user needs to be prompted to approve an action or to pass a security challenge, and when we leave the flow this method can be used to provide the answer to the SDK.

Link copied to clipboard
fun authenticate(url: String, passkeyId: String, callback: (Result<AuthenticateResponse>) -> Unit)
fun authenticate(url: String, passkeyId: String, dispatcher: CoroutineDispatcher = Dispatchers.Default): Flow<Result<AuthenticateResponse>>

Authenticate a user.

Link copied to clipboard
fun authenticateOtp(url: String, email: String, dispatcher: CoroutineDispatcher = Dispatchers.Default): Flow<Result<OtpChallengeResponse>>

Initiates authentication using an OTP, which will be sent to the provided email address.

Link copied to clipboard
fun bindPasskey(url: String, dispatcher: CoroutineDispatcher = Dispatchers.Default): Flow<Result<BindPasskeyResponse>>

Bind a passkey to this device.

Link copied to clipboard
fun deletePasskey(id: String, callback: (Result<Unit>) -> Unit)
fun deletePasskey(id: String, dispatcher: CoroutineDispatcher = Dispatchers.Default): Flow<Result<Unit>>

Delete a Passkey by ID on current device.

Link copied to clipboard
fun getAuthenticationContext(url: String, dispatcher: CoroutineDispatcher = Dispatchers.Default): Flow<Result<AuthenticationContext>>

Returns the Authentication Context for the current transaction.

Link copied to clipboard
fun getPasskeys(dispatcher: CoroutineDispatcher = Dispatchers.Default): Flow<Result<List<Passkey>>>

Get all current passkeys for this device.

Link copied to clipboard
fun init(app: Application, keyguardPrompt: ((allow: Boolean, Exception?) -> Unit) -> Unit?, logger: (String) -> Unit, biometricAskPrompt: String = app.getString(R.string.embedded_export_biometric_prompt_title), allowedDomains: List<String>? = null)

Initialize and configure the Beyond Identity Embedded SDK.

Link copied to clipboard
fun isAuthenticateUrl(url: String, dispatcher: CoroutineDispatcher = Dispatchers.IO): Flow<Boolean>

Returns whether a URL is a valid Authenticate URL or not.

Link copied to clipboard
fun isBindPasskeyUrl(url: String, dispatcher: CoroutineDispatcher = Dispatchers.IO): Flow<Boolean>

Returns whether a URL is a valid Bind Passkey URL or not.

Link copied to clipboard
fun redeemOtp(url: String, otp: String, callback: (Result<RedeemOtpResponse>) -> Unit)
fun redeemOtp(url: String, otp: String, dispatcher: CoroutineDispatcher = Dispatchers.Default): Flow<Result<RedeemOtpResponse>>

Redeems an OTP for a grant code.